package com.mxfcode.bbs_common.util;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

/**
 * <b>系统异常类</b>
 * 
 * @author OSWorks-XC
 */
public class AOSException extends RuntimeException {

	private static final long serialVersionUID = 1L;
	
	private static Log log = LogFactory.getLog(AOSException.class);

	public AOSException() {
		super();
	}


	
	/**
	 * 直接打印简单信息
	 * 
	 * @param pMsg
	 */
	public AOSException(String pMsg) {
		super(pMsg);
		log.error(pMsg);
	}

	/**
	 * 直接打印简单信息和异常堆栈
	 * 
	 * @param pMsg
	 * @param pNestedException
	 */
	public AOSException(String pMsg, Throwable pNestedException) {
		super(pMsg);
		pNestedException.printStackTrace();
	}
	
	/**
	 * 直接打印异常堆栈
	 *
	 * @param pNestedException
	 */
	public AOSException(Throwable pNestedException) {
		super(pNestedException);
		pNestedException.printStackTrace();
	}

}
